package com.aidysoft.practice.propertiesToSetValue;

/**
 * 〈测试配置文件赋值〉
 */

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
//该注解会读取配置文件中该前缀属性
@ConfigurationProperties(prefix = "users")
public class Users {
    private int age;
    private String name;
}
